package com.hospital.service.publics.model.param;


import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hospital.service.publics.entity.PubFilePath;
import com.hospital.service.publics.entity.help.PubFilePathHelp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import enhance.plus.util.MybatisPlusUtil;
import enhance.plus.util.PageHelper;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * 文件路径表 新增参数
 *
 * @author xhl
 * @created 2020-11-10 18:42:35
 */
@Data
@ToString
@Accessors(chain = true)
@ApiModel(value="PubFilePath[文件路径表]分页查询")
public class PubFilePathQueryPageParam extends PageHelper{

    /**
    * ID
    */
    @ApiModelProperty(value = "ID", required = false , example = "")
    private String id;

    /**
     * 项目检索编号
     */
    @ApiModelProperty(value = "项目检索编号", required = false , example = "")
    private String pathId;

    /**
     * 项目名称
     */
    @ApiModelProperty(value = "项目名称", required = false , example = "")
    private String path;

    /**
     * 概述
     */
    @ApiModelProperty(value = "概述", required = false , example = "")
    private String summary;

    /**
    * 把非 null 的值 转换成一个 查询条件
    * @return
    */
    public QueryWrapper<PubFilePath> convertParamToQueryWapper(){
        QueryWrapper<PubFilePath> query = PubFilePathHelp.createQuery();
        Map<String, Object> result =  MybatisPlusUtil.convertParamToMap(this, PubFilePath.class);
        query.allEq(result);
        return query;
    }
}
